import 'package:flu_framework/ui/home/widgets/use_btn_cell.dart';
import 'package:flutter/material.dart';

class UseBtnPage extends StatefulWidget {
  const UseBtnPage({Key? key}) : super(key: key);

  @override
  State<UseBtnPage> createState() => _UseBtnPageState();
}

class _UseBtnPageState extends State<UseBtnPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: ListView.builder(
        itemCount: 5,
        itemBuilder:(ctx,index){
          final UseBtnType btnType;
          switch(index){
            case 0:
              btnType = UseBtnType.onlyTitle;
              break;
            case 1:
              btnType = UseBtnType.onlyImage;
              break;
            case 2:
              btnType = UseBtnType.horizontal;
              break;
            case 3:
              btnType = UseBtnType.vertical;
              break;
            case 4:
              btnType = UseBtnType.alignment;
              break;
            default:
              btnType = UseBtnType.onlyTitle;
          }
         return UseBtnCell(btnType: btnType,);
        },
      ),
    );
  }
}
